package com.jzo2o.foundations.controller.inner;

import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.foundations.service.IServeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inner/serve")
@Api(tags = "内部接口 - 服务项相关接口")
public class InnerServeController {
    @Resource
    private IServeService serveService;

    @ApiOperation("远程调用查询服务信息接口")
    @GetMapping("/getServeInfo/{id}")
    public ServeAggregationResDTO getServeInfo(@PathVariable("id") @ApiParam(name = "serveId", value = "服务id")
                                    Long serveId) {
        return serveService.getServeInfo(serveId);
    }
}
